package com.cty.utils;

/**
 * @Auther: cty
 * @Date: 2020/4/17 12:44
 * @Description:
 * @version: 1.0
 */
public class Gen {
    public static String genHost(String[] args){
        if(args.length >= 2){
            System.out.println("Host: "+args[0]);
            return args[0];
        }else {
            System.out.println("Host: 127.0.0.1");
            return "127.0.0.1";
        }
    }

    public static int genPort(String[] args){
        if(args.length >= 2){
            System.out.println("Port: "+args[1]);
            return Integer.parseInt(args[1]);
        }else {
            System.out.println("Port: 9999");
            return 9999;
        }
    }
}
